public class CombNum{
	static int C(int m,int n){
		if(m<n || m<=0 || n<=0) return -1;
		else if(n==1 || n==m-1) return m;
		else if(m==n) return 1;
		else return C(m-1,n-1)+C(m-1,n);
	}
	public static void main(String args[]){
		int result;
		result=C(Integer.parseInt(args[0]),Integer.parseInt(args[1]));
		if(result<0){
			System.out.println("Invalid Input");
		}else{
			System.out.println(result);
		}
	}
}
